import { exInputNumber } from '@ve/common/components/extension'
import { exInput, exSwitch } from '../../extension/index'

export default {
  VERSION: '20230109',
  type: 'uiTree3D',
  name: '树组件',
  icon: 'checkbox-blank-line',
  svg: 'shuzhuangtu',
  //数据别名
  // dataName: 'uiFlexbox_data',
  //扩展
  extension: {
    isPxBox: exSwitch('是否是像素盒子', false),
    pxBoxHeight: exInputNumber('像素高度', 400, 1, 50000),
    boxHeight: exInputNumber('高度', 50, 1, 100),
    bgColor: {
      type: 'exSetChartColor',
      name: '背景颜色',
      value: '#fff',
    },
    requestSet: {
      type: 'exRequestSet',
      name: '接口配置',
      value: {
        api: '/wms/wms-web',
        method: 'wms.screen.query.test',
        getDataKey: 'wms.screen.query.test',
        loopRequest: false,
        loopTime: 3000,
        nameKey: '',
        valueKey: '',
        busList: [],
        dataObj: {},
        isJson: false,
        data: [
          { key: '#LIMIT#', value: '1' },
          { key: '#PAGE_SIZE#', value: '10' },
        ],
        isSwiper: true,
        resList: [],
      },
    },
    lableProps: exInput('显示props', ''),
    valueProps: exInput('传值props', ''),
    childProps: exInput('子数据props', ''),
    space: exInput('对齐像素', '15'),
    lineHeight: exInput('行高', '20'),
    fontSize: exInput('字体大小', '20'),
    fontColor: {
      type: 'exSetChartColor',
      name: '字体颜色',
      value: '#000',
    },
    selectBgColor: {
      type: 'exSetChartColor',
      name: '选中背景',
      value: '#000',
    },
    arrowColor: {
      type: 'exSetChartColor',
      name: '箭头颜色',
      value: '#000',
    },
    statusProps: exInput('状态props', ''),
    statusList: {
      type: 'exSetTreeStatus',
      name: '设置状态',
      value: [
        { statusValue: 1, statusColor: '#f00', fontColor: '#fff', name: '报警' },
        { statusValue: 2, statusColor: '#f00', name: '运行', fontColor: '#fff' },
        { statusValue: 3, statusColor: '#f00', name: '空闲', fontColor: '#fff' },
        { statusValue: 4, statusColor: '#000', name: '关机', fontColor: '#fff' },
      ],
    },
    isLazy: exSwitch('是否懒加载', false),
    typeProps: exInput('父props', ''),
    valuetypeProps: exInput('父props对应值', ''),
    isChild: exInput('是否有子集props', ''),
    isChildvalue: exInput('是否有子集对应值', ''),
  },
  list: [],
  interaction: [],
}
